import {getRequest, postRequest, putRequest} from "@/api/request";

export const doGetUser =(condition)=> postRequest('/user/getUserInfo',condition);

export const doUpdateUserStatus = (id) => getRequest('/user/updateUserStatus',{id})

export const doDeleteUser = (id) =>   getRequest('/user/deleteUser',{id})

export const doGetUserById = (id) => getRequest('/user/getUserInfoById',{id})

export const doGetUserByToken = (token) => getRequest('/user/getUserInfoByToken',{token})

export const doAddUser = (user) =>postRequest('/user/register',user);

export const doUpdateUser = (user)=>putRequest('/user/updateUser',user);

export const doGetUserByName = (name)=>getRequest("/user/getUserByName",{name})

export const doResetPassword = (id,password)=>getRequest('/user/resetPassword',{id,password})

export const doAddBalance = (id,price)=>getRequest('/user/addBalance',{id,price})